
/**
 * Created by chenxi on 2017/6/13.
 */
import Vue from 'vue';
import VueResource from 'vue-resource';

import tuanMyList from './tuan-mylist.vue';
import filter from '../../../assets/js/filter';
import common from '../../../assets/js/common';

Vue.use(VueResource);
filter(Vue);
//登录信息传输到后台
var backUrl = common.isdev()+"/user/checkLogin.htm";        
var hrefUrl = window.location.href;     
if(hrefUrl.indexOf("?userInfo=") > -1){
    backUrl = backUrl + hrefUrl.substring(hrefUrl.indexOf("?userInfo="));
    var promise = Vue.http.post(backUrl).then(function(d) {
        console.info('success');
    }, function(err) {
        console.info('err');
    });
    promise.then(function ( response ) {
		new Vue({
		    el: '#mylist',
		    render: h => h(tuanMyList)
		});
        // 成功回调
    });
}else{
	new Vue({
		el: '#mylist',
		render: h => h(tuanMyList)
	});
}
